package main

import (
	"fmt"
	"time"
)

//启动一个goroutine： go 函数调用

func demo() {
	fmt.Println("I am a goroutine")
}

//main本身也是一个goroutine
func main() {
	go demo() //启动一个goroutine执行demo
	fmt.Println("I am main goroutine")
	time.Sleep(time.Second * 1)
}
